<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib uri="/struts-tags" prefix="s" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!-- saved from url=(0044)http://localhost:8080/HouseRent/page/add.jsp -->
<HTML xmlns="http://www.w3.org/1999/xhtml"><HEAD><TITLE>云和租房 -发布房屋信息</TITLE>
<META content="text/html; charset=utf-8" http-equiv=Content-Type><LINK 
rel=stylesheet type=text/css href="../css/style.css">
<META name=GENERATOR content="MSHTML 8.00.7601.17514">
<script type="text/javascript" src="/jquery/jquery-1.8.3.js"></script>
<script>
init();

function init() {
	$(function() {
		$.ajax({
			type : "POST",
			url : "/json/get_getType",
			data : {},
			success : function(data) {
				var $suggest="";
				$.each(data.typeList,function(i, val) {
					$suggest +="<OPTION value="+val.typeid+">"+val.typename+"</OPTION>";
				});
				$("#type").html($suggest);
			}
		});
	}); 
	$(function () {
		$.ajax({
			type : "POST",
			url : "/json/get_getArea",
			data : {},
			success : function(data) {
				var $sug="";
				$.each(data.areaList,function(i, val) {
					$sug +="<OPTION value="+val.areaid+">"+val.areaname+"</OPTION>";
				});
				$("#area").html($sug);
			}
		});
	}) 
}
checkStreet(1);
function checkStreet(v) {
	$(function () {
		$.ajax({
			type : "POST",
			url : "/json/get_getStreet",
			data : {
				areaid:v
			},
			success : function(data) {
				var $s="";
				$.each(data.streetList,function(i, val) {
					$s +="<OPTION value="+val.streetid+">"+val.streetname+"</OPTION>";
				});
				$("#street").html($s);
			}
		})
		
	})
}
 
 
</script>

</HEAD>
<BODY>
<DIV id=header class=wrap>
<DIV id=logo><IMG src="../images/logo.gif"></DIV></DIV>
<DIV id=regLogin class=wrap>
<DIV class=dialog>
<DL class=clearfix>
  <DT>新房屋信息发布</DT>
  <DD class=past>填写房屋信息</DD></DL>
<DIV class=box>


<form method="post" action="editHouse.action" namespace="/" enctype="multipart/form-data">
<DIV class=infos>
<TABLE class=field>
  <TBODY>
  <TR>
    <TD class=field>标　　题：</TD>
    <TD><INPUT id=add_action_title class=text type=text name=house.title value="${house.title}"> </TD></TR>
  <TR>
    <TD class=field>户　　型：</TD>
    <TD>
      <SELECT class=text id="type" name=typeid >
    	<!-- <OPTION selected value=1000>一室一厅 </OPTION> -->
      </SELECT>
    </TD>
  </TR>
  <TR>
    <TD class=field>面　　积：</TD>
    <TD>
      <INPUT id=add_action_floorage class=text type=text name="house.floorage" value="${house.floorage}"/>
    </TD>
  </TR>
  <TR>
    <TD class=field>价　　格：</TD>
    <TD>
      <INPUT id=add_action_price class=text type=text name="house.price" value="${house.price}"/> 
    </TD>
  </TR>
  <TR>
    <TD class=field>房产证日期：</TD>
    <TD>
      <INPUT class=text type=text name=house.pubdate value="${house.pubdate}"/>
    </TD>
  </TR>
  <TR>
    <TD class=field>位　　置：</TD>
    <TD>区：<SELECT class=text id="area" name="areaid" onclick="checkStreet(this.value)" >
             <OPTION selected value=1004 >海淀区</OPTION>
           </SELECT> 
    	街：<SELECT class=text id="street" name="streetid" >
    	     <OPTION selected value=1001>请选择</OPTION>
    	   </SELECT>
   </TD>
 </TR>
  <TR>
    <TD class=field>联系方式：</TD>
    <TD>
      <INPUT id=add_action_contact class=text type=text  name=house.contact value="${house.contact}"> 
    </TD>
  </TR>
  <TR>
    <TD class=field>上传图片:</TD>
    <TD>
      <img alt="" src="images/${house.pic}">
      <s:file name="upload"/>
    </TD>
  </TR>
  <TR>
    <TD class=field>详细信息：</TD>
    <TD><TEXTAREA name=house.content value="${house.content}"></TEXTAREA></TD></TR></TBODY></TABLE>
    <!-- 保存用户id -->
    <input type="hidden" name=userid value="${user.userid}">
    <!-- 保存住房id -->
    <input type="hidden" name=houseid value="${house.houseid}">
<DIV class=buttons>
    <input value="确认修改" type="submit"> 
</DIV></DIV>
</form>




</DIV></DIV></DIV>
<DIV id=footer class=wrap>
<DL>
  <DT>云和租房 © 2010 云和 京ICP证1000001号</DT>
  <DD>关于我们 · 联系方式 · 意见反馈 · 帮助中心</DD></DL></DIV></BODY></HTML>
<script>
 



</script>